<table width="100%" border="0" cellpadding="0" cellspacing="0" class="guide">
	<tr>
		<td>
			<span style="float: left;">后台管理中心&nbsp;&raquo;&nbsp;首页管理</span>
			<span style="float: right;">
			    <a href="./?controller=indexlist&action=add&type=<?php echo $this->type;?>">+ 添加</a>
				<a href="javascript:history.go(-1);">&lt;- 返回</a>
			</span>
		</td>
	</tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
	<tr class="header">
		<td colspan="7"><?php echo $this->indexlist_type[$this->type];?></td>
	</tr>
	<tr class="category" align="center">
		<td width="10%">ID</td>
		<td width="20%">标题</td>
		<td width="10%">icon</td>
		<td width="10%">系统</td>
		<td width="20%">说明</td>
		<td width="10%">排序</td>
		<td width="20%">操作</td>
	</tr>
<?php
foreach ($this->data as $row)
{
    if($row['machine_type'] == 0){
        $machine_type = '全部';
    }elseif($row['machine_type'] == 1){
        $machine_type = 'ios';
    }elseif($row['machine_type'] == 2){
        $machine_type = '安卓';
    }
    
	echo <<<EOF
	<tr>
		<td class="altbg1" align="center">{$row['id']}</td>
		<td class="altbg2" align="center">{$row['title']}</td>
		<td class="altbg1" align="center"><img src="{$row['icon']}" width="100" /></td>
		<td class="altbg2" align="center">{$machine_type}</td>
		<td class="altbg1" align="center">{$row['remark']}</td>
		<td class="altbg2" align="center">{$row['rank']}</td>
		<td class="altbg1" align="center">
		    <a href="./?controller=indexlist&action=add&id={$row['id']}&type={$row['type']}">编辑</a><br />
		    <a href="./?controller=indexlist&action=delete&id={$row['id']}&type={$row['type']}">删除</a>
		</td>
	</tr>
EOF;
}
?>
	<tr class="category">
		<td align="center" colspan="7">
			<?php echo $this->paging; ?>
		</td>
	</tr>
</table>
